<template>
  <div :class="['cont_principal',className]">
    <div class="cont_error">

      <h1 v-if="error.statusCode === 404">404</h1>
      <h1 v-else>Oops</h1>
      <p>The Page you're looking for isn't here.</p>
      <p>
        <button @click="$router.go(-1) ">go back</button>
      </p>
    </div>
    <div class="cont_aura_1"></div>
    <div class="cont_aura_2"></div>
  </div>
</template>
<script>

  export default {
    props: ['error'],
    layout: 'empty' // you can set a custom layout for the error page
    ,data() {
      return {
        className:''
      }
    }
    ,mounted() {
      this.className="cont_principal cont_error_active"
    }
  }
</script>
<style scoped>
  * {
    margin: 0px auto;
    padding: 0px;
    text-align: center;
  }

  .cont_principal {
    background: #D4D9ED;
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999;
  }

  .cont_error {
    position: absolute;
    width: 100%;
    height: 300px;
    top: 50%;
    margin-top: -150px;
  }

  .cont_error > h1 {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 150px;
    color: #fff;
    position: relative;
    left: -100%;
    transition: all 0.5s;
  }
  .cont_error > p {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: 24px;
    letter-spacing: 5px;
    color: #9294AE;
    position: relative;
    left: 100%;
    top: 75px;
    transition: all 0.5s;
    transition-delay: 0.5s;
    -webkit-transition: all 0.5s;
    -webkit-transition-delay: 0.5s;
  }

  .cont_error > p > button {
    border: none;
    overflow: hidden;
    width: 130px;
    height: 40px;
    color: #fff;
    border-radius: 5px;
    padding: 10px 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    box-shadow: inset 2px 2px 2px 0px rgb(255 255 255 / 50%), 7px 7px 20px 0px rgb(0 0 0 / 10%), 4px 4px 5px 0px rgb(0 0 0 / 10%);
    outline: none;
  }

  .cont_error > p > button:hover {
    background: transparent;
    box-shadow: 4px 4px 6px 0 rgb(255 255 255 / 50%), -4px -4px 6px 0 rgb(116 125 136 / 20%), inset -4px -4px 6px 0 rgb(255 255 255 / 50%), inset 4px 4px 6px 0 rgb(116 125 136 / 30%);
    color: #fff;
  }

  .cont_error > p > button:after {
    position: absolute;
    content: " ";
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1fd1f9;
    background-image: linear-gradient(
      315deg, #1fd1f9 0%, #b621fe 74%);
    transition: all 0.3s ease;
  }
  .cont_error > p > button:hover:after {
    -webkit-transform: scale(2) rotate(
      180deg);
    transform: scale(2) rotate(
      180deg);
    box-shadow: 4px 4px 6px 0 rgb(255 255 255 / 50%), -4px -4px 6px 0 rgb(116 125 136 / 20%), inset -4px -4px 6px 0 rgb(255 255 255 / 50%), inset 4px 4px 6px 0 rgb(116 125 136 / 30%);
  }
  .cont_aura_1 {
    position: absolute;
    width: 300px;
    height: 120%;
    top: 25px;
    right: -340px;
    background-color: #8A65DF;
    box-shadow: 0px 0px 60px 20px rgba(137, 100, 222, 0.5);
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
  }

  .cont_aura_2 {
    position: absolute;
    width: 100%;
    height: 300px;
    right: -10%;
    bottom: -301px;
    background-color: #8B65E4;
    box-shadow: 0px 0px 60px 10px rgba(131, 95, 214, 0.5), 0px 0px 20px 0px rgba(0, 0, 0, 0.1);
    z-index: 5;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
  }

  .cont_error_active > .cont_error > h1 {
    left: 0%;
  }

  .cont_error_active > .cont_error > p {
    left: 0%;
  }

  .cont_error_active > .cont_aura_2 {
    animation-name: animation_error_2;
    animation-duration: 4s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    transform: rotate(-20deg);
  }

  .cont_error_active > .cont_aura_1 {
    transform: rotate(20deg);
    right: -170px;
    animation-name: animation_error_1;
    animation-duration: 4s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-direction: alternate;
  }

  @-webkit-keyframes animation_error_1 {
    from {
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
    }
    to {
      -webkit-transform: rotate(25deg);
      transform: rotate(25deg);
    }
  }

  @-o-keyframes animation_error_1 {
    from {
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
    }
    to {
      -webkit-transform: rotate(25deg);
      transform: rotate(25deg);
    }

  }

  @-moz-keyframes animation_error_1 {
    from {
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
    }
    to {
      -webkit-transform: rotate(25deg);
      transform: rotate(25deg);
    }
  }

  @keyframes animation_error_1 {
    from {
      -webkit-transform: rotate(20deg);
      transform: rotate(20deg);
    }
    to {
      -webkit-transform: rotate(25deg);
      transform: rotate(25deg);
    }
  }

  @-webkit-keyframes animation_error_2 {
    from {
      -webkit-transform: rotate(-15deg);
      transform: rotate(-15deg);
    }
    to {
      -webkit-transform: rotate(-20deg);
      transform: rotate(-20deg);
    }
  }

  @-o-keyframes animation_error_2 {
    from {
      -webkit-transform: rotate(-15deg);
      transform: rotate(-15deg);
    }
    to {
      -webkit-transform: rotate(-20deg);
      transform: rotate(-20deg);
    }
  }

  @-moz-keyframes animation_error_2 {
    from {
      -webkit-transform: rotate(-15deg);
      transform: rotate(-15deg);
    }
    to {
      -webkit-transform: rotate(-20deg);
      transform: rotate(-20deg);
    }
  }

  @keyframes animation_error_2 {
    from {
      -webkit-transform: rotate(-15deg);
      transform: rotate(-15deg);
    }
    to {
      -webkit-transform: rotate(-20deg);
      transform: rotate(-20deg);
    }
  }

</style>
